#!/bin/sh /etc/rc.common
# Copyright (c) 2011-2015 OpenWrt.org

START=60

start(){
	bbr=$(uci get flowoffload.@flow[0].bbr 2>/dev/null)
	if [ $bbr -eq 1 ];  then
		sysctl -w net.ipv4.tcp_congestion_control=bbr
	else
		sysctl -w net.ipv4.tcp_congestion_control=cubic
	fi
	#uci set firewall.@defaults[0].flow_offloading=$(uci get flowoffload.@flow[0].flow_offloading)
	#uci set firewall.@defaults[0].flow_offloading_hw=$(uci get flowoffload.@flow[0].flow_offloading_hw)
	#uci commit firewall
	/etc/init.d/firewall restart
}
